package cn.huiyunche.base.service.form;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

public class OrderForm {

    // 发运地址id
    @NotNull(message = "发车地址不能为空！")
    private long departaddrid;

    // 目的地地址id
    @NotNull(message = "收车地址不能为空！")
    private long receiptaddrid;

    // 提车日期
    @DateTimeFormat(iso = ISO.DATE)
    private Date deliverydate;

    //提车时间
    private int deliveryTime;

    // 送达日期
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date arrivedate;

    // 车型列表
    @NotBlank(message = "车辆信息不能为空！")
    private String vehiclesbrands;

    // 是否上门提车
    private Boolean ispick;

    // 是否送车上门
    private Boolean isdeliv;

    //是否是新车
    private Boolean issencondhand;

    //是否能开动

    private Boolean ismobile;

    //总估值
    @DecimalMin(value = "1.00", message = "估值不能低于1万元！")
    @DecimalMax(value = "1000000.00", message = "估值不能超过1000000万元！")
    private BigDecimal estvalue;

    //	@NotNull(message="物流产品id不能为空！")
    private Long productid;

    public long getDepartaddrid() {
        return departaddrid;
    }

    public void setDepartaddrid(long departaddrid) {
        this.departaddrid = departaddrid;
    }

    public long getReceiptaddrid() {
        return receiptaddrid;
    }

    public void setReceiptaddrid(long receiptaddrid) {
        this.receiptaddrid = receiptaddrid;
    }

    public Date getDeliverydate() {
        return deliverydate;
    }

    public void setDeliverydate(Date deliverydate) {
        this.deliverydate = deliverydate;
    }

    public int getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(int deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Date getArrivedate() {
        return arrivedate;
    }

    public void setArrivedate(Date arrivedate) {
        this.arrivedate = arrivedate;
    }

    public String getVehiclesbrands() {
        return vehiclesbrands;
    }

    public void setVehiclesbrands(String vehiclesbrands) {
        this.vehiclesbrands = vehiclesbrands;
    }

    public Boolean getIspick() {
        return ispick;
    }

    public void setIspick(Boolean ispick) {
        this.ispick = ispick;
    }

    public Boolean getIsdeliv() {
        return isdeliv;
    }

    public void setIsdeliv(Boolean isdeliv) {
        this.isdeliv = isdeliv;
    }

    public Boolean getIssencondhand() {
        return issencondhand;
    }

    public void setIssencondhand(Boolean issencondhand) {
        this.issencondhand = issencondhand;
    }

    public Boolean getIsmobile() {
        return ismobile;
    }

    public void setIsmobile(Boolean ismobile) {
        this.ismobile = ismobile;
    }

    public BigDecimal getEstvalue() {
        return estvalue;
    }

    public void setEstvalue(BigDecimal estvalue) {
        this.estvalue = estvalue;
    }

    public Long getProductid() {
        return productid;
    }

    public void setProductid(Long productid) {
        this.productid = productid;
    }

    @Override
    public String toString() {
        return "OrderForm [departaddrid=" + departaddrid + ", receiptaddrid=" + receiptaddrid + ", deliverydate="
                + deliverydate + ", deliveryTime=" + deliveryTime + ", arrivedate=" + arrivedate + ", vehiclesbrands="
                + vehiclesbrands + ", ispick=" + ispick + ", isdeliv=" + isdeliv + ", issencondhand=" + issencondhand
                + ", ismobile=" + ismobile + ", estvalue=" + estvalue + ", productid=" + productid + "]";
    }
}